home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / MW MPW Binaries 1.1.1a2 / mwcPPC / MWCIncludes / Icons.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-31  |  10.3 KB  |  282 lines  |  [TEXT/MMCC]

  1. /*
  2.     File:        Icons.h
  3.  
  4.     Copyright:    © 1984-1993 by Apple Computer, Inc., all rights reserved.
  5.  
  6.     WARNING
  7.     This file was auto generated by the interfacer tool. Modifications
  8.     must be made to the master file.
  9.  
  10. */
  11.  
  12. #ifndef __ICONS__
  13. #define __ICONS__
  14.  
  15. #ifndef __TYPES__
  16. #include <Types.h>
  17. /*    #include <ConditionalMacros.h>                                */
  18. /*    #include <MixedMode.h>                                        */
  19. /*        #include <Traps.h>                                        */
  20. #endif
  21.  
  22. #ifndef __QUICKDRAW__
  23. #include <Quickdraw.h>
  24. /*    #include <QuickdrawText.h>                                    */
  25. /*        #include <IntlResources.h>                                */
  26. #endif
  27.  
  28. enum  {
  29. /* The following are icons for which there are both icon suites and SICNs. */
  30.     genericDocumentIconResource    = -4000,
  31.     genericStationeryIconResource = -3985,
  32.     genericEditionFileIconResource = -3989,
  33.     genericApplicationIconResource = -3996,
  34.     genericDeskAccessoryIconResource = -3991,
  35.     genericFolderIconResource    = -3999,
  36.     privateFolderIconResource    = -3994,
  37.     floppyIconResource            = -3998,
  38.     trashIconResource            = -3993,
  39. /* The following are icons for which there are SICNs only. */
  40.     desktopIconResource            = -3992,
  41.     openFolderIconResource        = -3997,
  42.     genericHardDiskIconResource    = -3995,
  43.     genericFileServerIconResource = -3972,
  44.     genericSuitcaseIconResource    = -3970,
  45.     genericMoverObjectIconResource = -3969,
  46. /* The following are icons for which there are icon suites only. */
  47.     genericPreferencesIconResource = -3971,
  48.     genericQueryDocumentIconResource = -16506,
  49.     genericExtensionIconResource = -16415,
  50.     systemFolderIconResource    = -3983,
  51.     appleMenuFolderIconResource    = -3982
  52. };
  53.  
  54. #define large1BitMask 'ICN#'
  55.  
  56. #define large4BitData 'icl4'
  57.  
  58. #define large8BitData 'icl8'
  59.  
  60. #define small1BitMask 'ics#'
  61.  
  62. #define small4BitData 'ics4'
  63.  
  64. #define small8BitData 'ics8'
  65.  
  66. #define mini1BitMask 'icm#'
  67.  
  68. #define mini4BitData 'icm4'
  69.  
  70. #define mini8BitData 'icm8'
  71.  
  72. enum  {
  73.     startupFolderIconResource    = -3981,
  74.     ownedFolderIconResource        = -3980,
  75.     dropFolderIconResource        = -3979,
  76.     sharedFolderIconResource    = -3978,
  77.     mountedFolderIconResource    = -3977,
  78.     controlPanelFolderIconResource = -3976,
  79.     printMonitorFolderIconResource = -3975,
  80.     preferencesFolderIconResource = -3974,
  81.     extensionsFolderIconResource = -3973,
  82.     fontsFolderIconResource        = -3968,
  83.     fullTrashIconResource        = -3984
  84. };
  85.  
  86.  
  87. /*  alignment type values  */
  88.  
  89. enum  {
  90.     atNone                        = 0x0,
  91.     atVerticalCenter            = 0x1,
  92.     atTop                        = 0x2,
  93.     atBottom                    = 0x3,
  94.     atHorizontalCenter            = 0x4,
  95.     atAbsoluteCenter            = (atVerticalCenter|atHorizontalCenter),
  96.     atCenterTop                    = (atTop|atHorizontalCenter),
  97.     atCenterBottom                = (atBottom|atHorizontalCenter),
  98.     atLeft                        = 0x8,
  99.     atCenterLeft                = (atVerticalCenter|atLeft),
  100.     atTopLeft                    = (atTop|atLeft),
  101.     atBottomLeft                = (atBottom|atLeft),
  102.     atRight                        = 0xC,
  103.     atCenterRight                = (atVerticalCenter|atRight),
  104.     atTopRight                    = (atTop|atRight),
  105.     atBottomRight                = (atBottom|atRight)
  106. };
  107.  
  108. typedef short IconAlignmentType;
  109.  
  110.  
  111. /*  transform type values  */
  112.  
  113. enum  {
  114.     ttNone                        = 0x0,
  115.     ttDisabled                    = 0x1,
  116.     ttOffline                    = 0x2,
  117.     ttOpen                        = 0x3,
  118.     ttLabel1                    = 0x0100,
  119.     ttLabel2                    = 0x0200,
  120.     ttLabel3                    = 0x0300,
  121.     ttLabel4                    = 0x0400,
  122.     ttLabel5                    = 0x0500,
  123.     ttLabel6                    = 0x0600,
  124.     ttLabel7                    = 0x0700,
  125.     ttSelected                    = 0x4000,
  126.     ttSelectedDisabled            = (ttSelected|ttDisabled),
  127.     ttSelectedOffline            = (ttSelected|ttOffline),
  128.     ttSelectedOpen                = (ttSelected|ttOpen)
  129. };
  130.  
  131. typedef short IconTransformType;
  132.  
  133.  
  134. /*  Selector mask values  */
  135.  
  136. enum  {
  137.     svLarge1Bit                    = 0x00000001,
  138.     svLarge4Bit                    = 0x00000002,
  139.     svLarge8Bit                    = 0x00000004,
  140.     svSmall1Bit                    = 0x00000100,
  141.     svSmall4Bit                    = 0x00000200,
  142.     svSmall8Bit                    = 0x00000400,
  143.     svMini1Bit                    = 0x00010000,
  144.     svMini4Bit                    = 0x00020000,
  145.     svMini8Bit                    = 0x00040000,
  146.     svAllLargeData                = 0x000000ff,
  147.     svAllSmallData                = 0x0000ff00,
  148.     svAllMiniData                = 0x00ff0000,
  149.     svAll1BitData                = (svLarge1Bit|svSmall1Bit|svMini1Bit),
  150.     svAll4BitData                = (svLarge4Bit|svSmall4Bit|svMini4Bit),
  151.     svAll8BitData                = (svLarge8Bit|svSmall8Bit|svMini8Bit),
  152.     svAllAvailableData            = (long)0xffffffff
  153. };
  154.  
  155. typedef unsigned long IconSelectorValue;
  156.  
  157. typedef pascal OSErr (*IconActionProcPtr)(ResType theType, Handle *theIcon, void *yourDataPtr);
  158.  
  159. enum {
  160.     uppIconActionProcInfo = kPascalStackBased
  161.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  162.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(ResType)))
  163.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Handle*)))
  164.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void*)))
  165. };
  166.  
  167. #if USESROUTINEDESCRIPTORS
  168. typedef UniversalProcPtr IconActionUPP;
  169.  
  170. #define CallIconActionProc(userRoutine, theType, theIcon, yourDataPtr)        \
  171.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppIconActionProcInfo, (theType), (theIcon), (yourDataPtr))
  172. #define NewIconActionProc(userRoutine)        \
  173.         (IconActionUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppIconActionProcInfo, GetCurrentISA())
  174. #else
  175. typedef IconActionProcPtr IconActionUPP;
  176.  
  177. #define CallIconActionProc(userRoutine, theType, theIcon, yourDataPtr)        \
  178.         (*(userRoutine))((theType), (theIcon), (yourDataPtr))
  179. #define NewIconActionProc(userRoutine)        \
  180.         (IconActionUPP)(userRoutine)
  181. #endif
  182.  
  183. typedef IconActionProcPtr IconAction;
  184.  
  185. typedef pascal Handle (*IconGetterProcPtr)(ResType theType, void *yourDataPtr);
  186.  
  187. enum {
  188.     uppIconGetterProcInfo = kPascalStackBased
  189.          | RESULT_SIZE(SIZE_CODE(sizeof(Handle)))
  190.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(ResType)))
  191.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void*)))
  192. };
  193.  
  194. #if USESROUTINEDESCRIPTORS
  195. typedef UniversalProcPtr IconGetterUPP;
  196.  
  197. #define CallIconGetterProc(userRoutine, theType, yourDataPtr)        \
  198.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppIconGetterProcInfo, (theType), (yourDataPtr))
  199. #define NewIconGetterProc(userRoutine)        \
  200.         (IconGetterUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppIconGetterProcInfo, GetCurrentISA())
  201. #else
  202. typedef IconGetterProcPtr IconGetterUPP;
  203.  
  204. #define CallIconGetterProc(userRoutine, theType, yourDataPtr)        \
  205.         (*(userRoutine))((theType), (yourDataPtr))
  206. #define NewIconGetterProc(userRoutine)        \
  207.         (IconGetterUPP)(userRoutine)
  208. #endif
  209.  
  210. typedef IconGetterProcPtr IconGetter;
  211.  
  212. #ifdef __cplusplus
  213. extern "C" {
  214. #endif
  215.  
  216. extern pascal OSErr PlotIconID(const Rect *theRect, IconAlignmentType align, IconTransformType transform, short theResID)
  217.  THREEWORDINLINE(0x303C, 0x0500, 0xABC9);
  218. extern pascal OSErr NewIconSuite(Handle *theIconSuite)
  219.  THREEWORDINLINE(0x303C, 0x0207, 0xABC9);
  220. extern pascal OSErr AddIconToSuite(Handle theIconData, Handle theSuite, ResType theType)
  221.  THREEWORDINLINE(0x303C, 0x0608, 0xABC9);
  222. extern pascal OSErr GetIconFromSuite(Handle *theIconData, Handle theSuite, ResType theType)
  223.  THREEWORDINLINE(0x303C, 0x0609, 0xABC9);
  224. extern pascal OSErr ForEachIconDo(Handle theSuite, IconSelectorValue selector, IconActionUPP action, void *yourDataPtr)
  225.  THREEWORDINLINE(0x303C, 0x080A, 0xABC9);
  226. extern pascal OSErr GetIconSuite(Handle *theIconSuite, short theResID, IconSelectorValue selector)
  227.  THREEWORDINLINE(0x303C, 0x0501, 0xABC9);
  228. extern pascal OSErr DisposeIconSuite(Handle theIconSuite, Boolean disposeData)
  229.  THREEWORDINLINE(0x303C, 0x0302, 0xABC9);
  230. extern pascal OSErr PlotIconSuite(const Rect *theRect, IconAlignmentType align, IconTransformType transform, Handle theIconSuite)
  231.  THREEWORDINLINE(0x303C, 0x0603, 0xABC9);
  232. extern pascal OSErr MakeIconCache(Handle *theHandle, IconGetterUPP makeIcon, void *yourDataPtr)
  233.  THREEWORDINLINE(0x303C, 0x0604, 0xABC9);
  234. extern pascal OSErr LoadIconCache(const Rect *theRect, IconAlignmentType align, IconTransformType transform, Handle theIconCache)
  235.  THREEWORDINLINE(0x303C, 0x0606, 0xABC9);
  236. extern pascal OSErr PlotIconMethod(const Rect *theRect, IconAlignmentType align, IconTransformType transform, IconGetterUPP theMethod, void *yourDataPtr)
  237.  THREEWORDINLINE(0x303C, 0x0805, 0xABC9);
  238. extern pascal OSErr GetLabel(short labelNumber, RGBColor *labelColor, Str255 labelString)
  239.  THREEWORDINLINE(0x303C, 0x050B, 0xABC9);
  240. extern pascal Boolean PtInIconID(Point testPt, const Rect *iconRect, IconAlignmentType align, short iconID)
  241.  THREEWORDINLINE(0x303C, 0x060D, 0xABC9);
  242. extern pascal Boolean PtInIconSuite(Point testPt, const Rect *iconRect, IconAlignmentType align, Handle theIconSuite)
  243.  THREEWORDINLINE(0x303C, 0x070E, 0xABC9);
  244. extern pascal Boolean PtInIconMethod(Point testPt, const Rect *iconRect, IconAlignmentType align, IconGetterUPP theMethod, void *yourDataPtr)
  245.  THREEWORDINLINE(0x303C, 0x090F, 0xABC9);
  246. extern pascal Boolean RectInIconID(const Rect *testRect, const Rect *iconRect, IconAlignmentType align, short iconID)
  247.  THREEWORDINLINE(0x303C, 0x0610, 0xABC9);
  248. extern pascal Boolean RectInIconSuite(const Rect *testRect, const Rect *iconRect, IconAlignmentType align, Handle theIconSuite)
  249.  THREEWORDINLINE(0x303C, 0x0711, 0xABC9);
  250. extern pascal Boolean RectInIconMethod(const Rect *testRect, const Rect *iconRect, IconAlignmentType align, IconGetterUPP theMethod, void *yourDataPtr)
  251.  THREEWORDINLINE(0x303C, 0x0912, 0xABC9);
  252. extern pascal OSErr IconIDToRgn(RgnHandle theRgn, const Rect *iconRect, IconAlignmentType align, short iconID)
  253.  THREEWORDINLINE(0x303C, 0x0613, 0xABC9);
  254. extern pascal OSErr IconSuiteToRgn(RgnHandle theRgn, const Rect *iconRect, IconAlignmentType align, Handle theIconSuite)
  255.  THREEWORDINLINE(0x303C, 0x0714, 0xABC9);
  256. extern pascal OSErr IconMethodToRgn(RgnHandle theRgn, const Rect *iconRect, IconAlignmentType align, IconGetterUPP theMethod, void *yourDataPtr)
  257.  THREEWORDINLINE(0x303C, 0x0915, 0xABC9);
  258. extern pascal OSErr SetSuiteLabel(Handle theSuite, short theLabel)
  259.  THREEWORDINLINE(0x303C, 0x0316, 0xABC9);
  260. extern pascal short GetSuiteLabel(Handle theSuite)
  261.  THREEWORDINLINE(0x303C, 0x0217, 0xABC9);
  262. extern pascal OSErr GetIconCacheData(Handle theCache, void **theData)
  263.  THREEWORDINLINE(0x303C, 0x0419, 0xABC9);
  264. extern pascal OSErr SetIconCacheData(Handle theCache, void *theData)
  265.  THREEWORDINLINE(0x303C, 0x041A, 0xABC9);
  266. extern pascal OSErr GetIconCacheProc(Handle theCache, IconGetterUPP *theProc)
  267.  THREEWORDINLINE(0x303C, 0x041B, 0xABC9);
  268. extern pascal OSErr SetIconCacheProc(Handle theCache, IconGetterUPP theProc)
  269.  THREEWORDINLINE(0x303C, 0x041C, 0xABC9);
  270. extern pascal OSErr PlotIconHandle(const Rect *theRect, IconAlignmentType align, IconTransformType transform, Handle theIcon)
  271.  THREEWORDINLINE(0x303C, 0x061D, 0xABC9);
  272. extern pascal OSErr PlotSICNHandle(const Rect *theRect, IconAlignmentType align, IconTransformType transform, Handle theSICN)
  273.  THREEWORDINLINE(0x303C, 0x061E, 0xABC9);
  274. extern pascal OSErr PlotCIconHandle(const Rect *theRect, IconAlignmentType align, IconTransformType transform, CIconHandle theCIcon)
  275.  THREEWORDINLINE(0x303C, 0x061F, 0xABC9);
  276. #ifdef __cplusplus
  277. }
  278. #endif
  279.  
  280. #endif
  281.  
  282.